﻿<%@ WebHandler Language="C#" Class="piece_append" %>

using System;
using System.Web;
using System.Web.SessionState;
using TSqlServer;

public class piece_append : IHttpHandler, IReadOnlySessionState
{
    
    public void ProcessRequest (HttpContext context) {

        
        //context.Request.ContentType="text/HTML;charset=utf-8";
        //context.Request.ContentType = "charset=utf-8";
        
        TCMSPiece oPiece = new TCMSPiece();
        oPiece.PieceName = context.Request["piecename"].ToString();
        oPiece.PieceContent = context.Request["piececontent"].ToString();
        oPiece.InMan = context.Session["ecrm_uid"].ToString();
        oPiece.Insert();

        context.Response.End();
    }
 
    public bool IsReusable {
        get {
            return false;
        }
    }

}